home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 145
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin
/
tools
/
sharp
/
xc2103i.lzh
/
XC2103.XDF
/
ASK30
/
MODESW.S
< prev
next >
Wrap
Text File
|
1993-09-15
|
2KB
|
134 lines
********************************************************************************
*
* モード切替 for ASK3
* Copyright (C) 1992 ACCESS CO.,LTD.
*
********************************************************************************
.include doscall.mac
CACI_END equ $ff
.text
.even
*
*デバイスヘッダ、その他
*
devhdr:
.dc.l -1
.dc.w $8000
.dc.l str
.dc.l intr
.dc.b 'XFER***/'
rqhdr: .dc.l 0
str:
move.l a5,rqhdr
rts
intr:
movem.l d0-d7/a0-a6,-(sp)
move.l rqhdr,a5
clr.l d0
move.b 2(a5),d0
tst.b d0
bne notcom
bsr init
move.b d0,3(a5)
lsr.w #8,d0
move.b d0,4(a5)
bra intr_end
notcom:
move.b #$03,3(a5)
move.b #$00,4(a5)
intr_end:
movem.l (sp)+,d0-d7/a0-a6
rts
*
*アクセサリエントリ
*
acc_main:
cmpi.w #0,ledoff
beq on
off: clr.w ledoff
jsr getmode
move.l d0,ledmd
move.l #2,-(sp)
jsr setmode
addq.l #4,sp
move.l #CACI_END,d0
rts
on: move.w #1,ledoff
move.l ledmd,-(sp)
jsr setmode
addq.l #4,sp
move.l #CACI_END,d0
rts
*
*入力モードの設定(FPコール5番)
*
setmode:
move.l 4(sp),-(sp)
move.l #5,-(sp)
DOS _KNJCTRL
addq.l #8,sp
rts
*
*入力モードの取得(FPコール6番)
*
getmode:
move.l #6,-(sp)
DOS _KNJCTRL
addq.l #4,sp
rts
*
*アクセサリ定義構造体
*
accdef: .dc.w 3 *KS_EDIT0|KS_EDITING
.dc.w $0155 *NOT_ASCII|XF1_KEY
.dc.l acc_main
.dc.l cbuf
.dc.l 0
.dc.l 0
cbuf: .ds.b 80
ledoff: .dc.w 1 *トグルするためのフラグ
ledmd: .ds.l 1 *入力モードを保存する
*
*非常駐部
*
init:
move.l #50,-(sp) *ASKのバージョンチェック
DOS _KNJCTRL
addq.l #4,sp
cmpi.l #300,d0
blt ask3_not_exist
pea.l accdef *アクセサリを登録する
move.l #60,-(sp)
DOS _KNJCTRL
addq.l #8,sp
cmpi.l #-1,d0
beq inierr
pea.l okmes
DOS _PRINT
addq.l #4,sp
move.l #init,14(a5)
clr.l d0
rts
ask3_not_exist:
pea.l errmes
DOS _PRINT
addq.l #4,sp
inierr: move.w #$700d,d0
rts
okmes: .dc.b 'モード切替 for ASK3 Copyright (C) 1992 ACCESS CO.,LTD.',13,10,0
errmes: .dc.b 'ASKver3.00以上がありません. ',0
.end